Skip to content

Add E2E triage test case for not-affected resolution (RHEL-174694)#556

Open
TomasTomecek wants to merge 1 commit into
packit:mainfrom
TomasTomecek:e2e-frr
Open

Add E2E triage test case for not-affected resolution (RHEL-174694)#556
TomasTomecek wants to merge 1 commit into
packit:mainfrom
TomasTomecek:e2e-frr

Conversation

@TomasTomecek
Copy link
Copy Markdown
Member

Summary

  • Add triage E2E test case for RHEL-174694 (CVE-2026-37459 frr) which expects a not-affected resolution — the first test case for this resolution type
  • Restructure test assertions so package and fix_version are only checked for resolution types that have them (BACKPORT, REBASE), since NotAffectedData has a different schema
  • For NOT_AFFECTED, assert the agent produces a non-empty explanation

Corresponding test fixture data (mock Jira + mock repo config) added to the testing-jiras repo.

Test plan

  • Ran make run-triage-agent-e2e-tests locally — RHEL-174694 test case passes

🤖 Generated with Claude Code

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the end-to-end triage agent tests to support the NOT_AFFECTED resolution. It introduces a new test case using NotAffectedData and restructures the assertions in test_triage_agent to be resolution-specific. Feedback suggests strengthening the assertions for the NOT_AFFECTED resolution by verifying the data type is NotAffectedData and ensuring justification_category is present.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +258 to +260
elif expected_output.resolution == Resolution.NOT_AFFECTED:
# TODO: validate justification_category against a known set of values
assert real_output.data.explanation
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure robust validation of the NOT_AFFECTED resolution, we should explicitly verify that real_output.data is an instance of NotAffectedData (preventing Pydantic union coercion issues) and assert that justification_category is populated and non-empty, as it is a required metadata field for Red Hat's triage process.

Suggested change
elif expected_output.resolution == Resolution.NOT_AFFECTED:
# TODO: validate justification_category against a known set of values
assert real_output.data.explanation
elif expected_output.resolution == Resolution.NOT_AFFECTED:
assert isinstance(real_output.data, NotAffectedData)
assert real_output.data.explanation
assert real_output.data.justification_category

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Assisted-by: Claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant